<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>管理员登录</title>
    <link rel="stylesheet" href="./user-管理员.css">
    <script src="http://code.jquery.com/jquery-latest.js"></script>
    <script>
        function change(){
            var txt = document.getElementById("userid");
            var val = txt.value;
            var str = val.replace(/(^\s*)|(\s*$)/g, '');//去除空格;
            if(str == '' || str == undefined || str == null){
                document.getElementById('login').style="background-color: #e5e5e5;"
               
            }else{
                document.getElementById('login').style="background-color: #3298e7;";
                
            }

        }

    </script>

</head>
<body>
    <!-- 登录盒子 -->
    <div class="box">
        <!-- 顶部图标 -->
        <div class="top">
            <img src="picture/userlogo.png" alt="">
        </div>
        <!-- 中间输入信息界面 -->
        <div class="text1 clearfix" >
            <img src="picture/touxiang.jpeg" alt="">
            <input type="text" id="userid" placeholder="手机号/用户名/UUID/邮箱" oninput="change()">
        </div>
        <div class="text2 clearfix">
            <img src="picture/密码.jpeg" alt="">
            <input id="password" type="password" placeholder="请输入密码">
        </div>
        <!-- 登录 -->
        <button class="register" id="login" value="register" >
            登录
        </button>
    </div>
</body>
<script>

    $("#login").click(function () {
        var user = $("#userid").val();
        var pw = $("#password").val();
        if (user=="12345678975"||user=="2450033445@qq.com"||user=="123456789"||user=="1"){
            if (pw==123456){
                window.location.href="./manage.html"
            }else{
                alert("登陆失败");
            }
        }else {
            alert("登录失败");
        }
    })
</script>
</html>